package com.adnaan.backend.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * author: adnaan
 * create: 2025-01-05 15:34
 * Description:
 */
@Data
@Schema(name = "BaseEntity", description = "基础实体类")
@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseEntity {
    @TableId(type = IdType.AUTO)
    @Schema(name = "id", description = "主键")
    private Long id;
    /**
     * 创建时间
     */
    @Schema(name = "createTime", description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @Schema(hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 备注
     */
    @Schema(name = "remark", description = "备注")
    private String remark;
}
